﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<HuynhQuangWebsite.Models.HomeListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>

<!-- #subheader -->	
		
			<section class="pagemid">
				<div class="inner">
					
					<div id="main">
						<div class="entry-content">

							<article>

								<div class="portfolio_item">
		<%if (Model != null)
           {
               if (Model.ProjectList != null)
               {
                   for (int i = 0; i < Model.ProjectList.Count(); i++)
                   {
                       var itemAt = Model.ProjectList.ElementAt(i);
                        %>
									<div class="two_third ">
										<div class="port_box">
											<div class="port_img">
												<div class="post_img">
													<img src="<%=itemAt.ProjectImgThumb %>" alt="img"/>
												</div>
												<div class="hover_type">
                                                    <%=Html.FriendlyTextUrl(itemAt.ProjectTitle, "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } }, new Dictionary<string,string>() { {"class", "hoverlink" }})%>
                                                  <%--  <a class="hoverlink" href="<%:Url.Action("Chi_tiet", "Du_an") %>"></a>--%>
													<a class="lightbox hoverimage" href="../../Images/assets/preview_img.jpg"></a>
												</div>												
											</div>
										</div>
									</div>
									<!-- .two_third -->
									<div class="one_third last">
										<div class="port_desc col1">
											<h5> <%=Html.FriendlyTextUrl(itemAt.ProjectTitle, "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%></h5>
											<p class="extras"><span class="pdate"><%=itemAt.ProjectStartDate%>.</span></p>
                                            <%if (itemAt.ProjectInfo.Length > 500)
                                              { %>
											    <p><%=itemAt.ProjectInfo.Substring(0, 500) + "..."%></p>
                                                <p> <%=Html.FriendlyTextUrl("Xem tiếp...", "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%></p>
                                            <%}
                                              else
                                              { %>
                                             <p><%=itemAt.ProjectInfo%></p>
                                             <%}%>
                                               	</div>
									</div>
                                    <div class="divider_space"></div>
                                          <% }%>
                                  
											
									
									<!-- .one_third -->
									
									
									
								</div>
								<!-- .portfolio_item -->
								         <div class="clear"></div>
					        <div class="divider_line"></div>
					        <div class="pagination wp-pagenavi">
						        <span class="pages extend">Page 1  of  2</span>
						        <span class="current">1</span>
						        <a href="#" class="inactive" >2</a>
                                    <%=Ajax.Pager(Model.ProjectInfo.CurrentPage, Model.ProjectInfo.TotalItems, "ProjectList", 0, Model.ProjectInfo.ItemsPerPage, "Paging")%>
					        </div>			
								<!-- .pagination -->
                    <%  }
                      } %>
								
							</article>
							<!-- article -->
						
						</div>
						<!-- .content -->
					</div>
					<!-- #fullwidth -->

			
				</div>
				<!-- .inner -->
			</section>
			<!-- .pagemid -->
